<!-- Copyright 2017 Capital One Services, LLC and Bitwise, Inc.
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License. -->
 
 
<!doctype html>
<html>
<head>
	<title>Output File Mixed Scheme Properties</title>
	<link rel="stylesheet" type="text/css" href="../../css/style.css">
</head>
<body>

<p><span class="header-1">Output File Mixed Scheme Properties</span></p>

<p><span><b>Properties</b>&nbsp;for the Output File Mixed Scheme component can be viewed by Double clicking the component on canvas. The properties contain a &#39;General&#39; tab and a &#39;Schema&#39; tab. Common and mandatory properties are present in the General tab. Schema displays option to accept the field schema i.e. field name, Data type, scale etc. </span></p>

<p><a name="general_properties"></a><span class="header-2">General Properties: </span></p>

<p><img alt="" src="../../images/Output_File_Mixed_Scheme_Properties_General.png" /></p>

<p><span class="header-2">Display</span></p>

<ul>
	<li><span><b>Name</b> - The Name field will specify the name of the component as desired by the user.</span></li>
	<li><span><b>ID</b> - ID field will specify unique id for every component. </span></li>
	<li><span><b>Type </b> - Type further categorizes the component to detailed operation that it intends to perform. Here it is of type Output File Mixed Scheme.</span></li>
</ul>

<p><span class="header-2">Configuration</span></p>

<ul>
	<li><span><b>File Path</b> - File path is used to specify the path where the Output mixed scheme file will be generated after successful execution . User can either manually type the path in the text box provided or use the Browse button to search for a location to save the output file. Alternatively, the user can parameterize the File path where the parameter value will be resolved at run-time.</span></li>
	<li><span><b>Overwrite</b> - This property accepts Boolean values True and False. It can also be parameterized and later on resolved during run-time. The Overwrite property when True, overwrites the output file.</span></li>
	<li><span><b>Safe Property</b> - This property accepts Boolean values True and False. It can also be parameterized and later on resolved during run-time. The Safe property when True, allows the Output fields to pass evaluation despite of Data type mismatch. When False, fields with Data type mismatch will be rejected and the component will abort processing returning an error.</span></li>
	<li><span><b>Character Set</b> - Contains a drop-down of character encoding values. Used simply to denote the encoding system that will be used while creating the Output file to denote characters of data. Drop down lists values like : UTF8, US-ASCII, ISO-8859-1 etc.</span></li>
	<li><span><b>Strict</b> - Strict accepts&nbsp;Boolean values True and False. It can also be parameterized and later on resolved during run-time. Strict property is used to check if the record structure i.e. number of fields, length of records, scale etc are exactly listed by the user as received from the Input file. When set to True, the component fails if the record structure doesn&#39;t match with the one specified by the user. Reverse in case of False.</span></li>
	<li><a name="runtime_properties"></a><span><b>Runtime Properties</b> - Runtime properties are used to override the Hadoop configurations specific to this Output File Mixed Scheme component at run time. User is required to enter the Property Name and Property Value in the runtime properties grid.</span>
	<p><span>Check <a href="../../How To Steps/How_To_Pass_Hadoop_Properties_To_Component.html"> How to pass Hadoop properties to component</a></span></p></li>
	<p><img alt="" src="../../images/Runtime_Properties_Grid.png" /></p>
	<li><span><b>Batch</b> - Batch simply accepts a numeric value starting from 0 to maximum 99 and signifies the batch this component will execute in. By default this is 0.</span></li>
</ul>

<p><a name="schema"></a><span class="header-2">Schema tab: </span></p>

<p><img alt="" src="../../images/Output_File_Mixed_Scheme_Properties_Schema.png" /></p>
<p><span>Schema is <b>mandatory</b> for output file mixed scheme component. Schema tab defines the record format on the out port of the output file mixed scheme component. A field in schema has multiple attributes as described below.</span></p>
<ul>
	<li><span><b>Internal</b> - User is provided a Grid to enter the internal schema of the Output Mixed file.</span></li>
	<ul>
	<li><span><b>Field Name</b> - User needs to enter all the field names. This is a mandatory attribute.</span></li>
	<li><span><b>Date Format</b> - For the format of date data type. Refer to <a href="../../references/Date_formats.html">Date formats</a> page for acceptable date formats.</span></li>
	<li><span><b>Data type</b> - By default "string" Data type has been selected for any field added to the Grid. Check supported data types page for list of supported data types.</span></li>
	<li><span><b>Precision</b> - Precision for a bigdecimal field can be specified here.</span></li>
	<li><span><b>Scale</b> - Scale for a bigdecimal field can be specified here.</span></li>
	<li><span><b>Scale Type</b> - Scale Type accepts values as implicit or explicit for bigdecimal field and none for other data types. Explicit considers the length of ' <b>.</b> ' and implicit ignores length of ' <b>.</b> ' for the bigdecimal field.</span></li>
	<li><span><b>Field Description</b> - User can specify field description.</span></li>
	<li><span><b>Length</b> - Length denotes the maximum number of characters that a particular Output field may contain.</span></li>
	<li><span><b>Delimiter</b> - The Delimiter field accepts the delimiter that will be used in the created Output file. By default the delimiter passed to this component is &#39;|&#39;</span></li>
	</ul>
	
	<li><span><b>External</b> <ul>
		<li><b>Import XML</b>- User can provide an external Hydrograph Schema file of XML format. A text box is provided to either manually type or use the Browse button to select the schema file from File system. The External schema file path is resolved during run time and replaced with the contents of the file in the Job XML.</li>
		<li><b>Export XML</b>- User can provide an external directory path to export Hydrograph Schema file in XML format. A text box is provided to either manually type or use the Browse button to specify the output directory on File system. The External directory path is resolved during run time and the xml schema file is saved in it.</li>
	</ul></span></li>
</ul>
<p>
	<span><b>Pull Schema</b> - The schema defined in operation editor's output will be pulled to the schema tab. The current schema in the grid will be overwritten with the schema from operation editor's output.</span>
</p>
<p><a name="validations"></a><span class="header-2">Validations</span></p>
<p><span>The Output File Mixed Scheme components applies validations to the mandatory fields as described above. Upon placing the Output File Mixed Scheme component on job canvas for the first time (from component palette), the component shows up a warning icon as mandatory properties are not provided.</span></p>
<img src="../../images/Output_file_mixed_scheme_warning_canvas.png" alt="Error icon displayed on tabs" />

<p><span>The property window also displays error if any of the property is not placed or described properly. It shows up a warning icon with a message like below in case of the file path (if it contains any character other than underscore or alphanumeric).</span></p>
<img src="../../images/Output_file_mixed_scheme_filepath_validation.png" alt="Warning icon displayed on component" />

<p><span>Also, If the user has not provided any value to the Batch field,then also it shows up a message saying "Batch should not be blank" as shown in the below example.</span></p>
<img src="../../images/Output_file_mixed_scheme_batch_warning.png" alt="Error icon displayed on component" />

<p><span>If the properties window has some error even after user visits it once, then the warning icon on the Output File Mixed Scheme component on the job canvas changes to error icon. This error icon is removed only when all the mandatory fields are supplied with correct values.</span></p>
<img src="../../images/Output_file_mixed_scheme_warning.png" alt="Error icon displayed on component" />

</body>
</html>
